Optimal. Leaf size=79 \[ b^3 x+\frac {a \left (a^2+6 b^2\right ) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {5 a^2 b \tan (c+d x)}{2 d}+\frac {a^2 (a+b \cos (c+d x)) \sec (c+d x) \tan (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2871, 3100,
2814, 3855} \begin {gather*} \frac {a \left (a^2+6 b^2\right ) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {5 a^2 b \tan (c+d x)}{2 d}+\frac {a^2 \tan (c+d x) \sec (c+d x) (a+b \cos (c+d x))}{2 d}+b^3 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2814
Rule 2871
Rule 3100
Rule 3855
Rubi steps
\begin {align*} \int (a+b \cos (c+d x))^3 \sec ^3(c+d x) \, dx &=\frac {a^2 (a+b \cos (c+d x)) \sec (c+d x) \tan (c+d x)}{2 d}+\frac {1}{2} \int \left (5 a^2 b+a \left (a^2+6 b^2\right ) \cos (c+d x)+2 b^3 \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx\\ &=\frac {5 a^2 b \tan (c+d x)}{2 d}+\frac {a^2 (a+b \cos (c+d x)) \sec (c+d x) \tan (c+d x)}{2 d}+\frac {1}{2} \int \left (a \left (a^2+6 b^2\right )+2 b^3 \cos (c+d x)\right ) \sec (c+d x) \, dx\\ &=b^3 x+\frac {5 a^2 b \tan (c+d x)}{2 d}+\frac {a^2 (a+b \cos (c+d x)) \sec (c+d x) \tan (c+d x)}{2 d}+\frac {1}{2} \left (a \left (a^2+6 b^2\right )\right ) \int \sec (c+d x) \, dx\\ &=b^3 x+\frac {a \left (a^2+6 b^2\right ) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {5 a^2 b \tan (c+d x)}{2 d}+\frac {a^2 (a+b \cos (c+d x)) \sec (c+d x) \tan (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.19, size = 55, normalized size = 0.70 \begin {gather*} \frac {2 b^3 d x+a \left (a^2+6 b^2\right ) \tanh ^{-1}(\sin (c+d x))+a^2 (6 b+a \sec (c+d x)) \tan (c+d x)}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.18, size = 82, normalized size = 1.04
method | result | size |
derivativedivides | \(\frac {a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+3 a^{2} b \tan \left (d x +c \right )+3 b^{2} a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+b^{3} \left (d x +c \right )}{d}\) | \(82\) |
default | \(\frac {a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+3 a^{2} b \tan \left (d x +c \right )+3 b^{2} a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+b^{3} \left (d x +c \right )}{d}\) | \(82\) |
risch | \(b^{3} x -\frac {i a^{2} \left (a \,{\mathrm e}^{3 i \left (d x +c \right )}-6 b \,{\mathrm e}^{2 i \left (d x +c \right )}-a \,{\mathrm e}^{i \left (d x +c \right )}-6 b \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{2}}{d}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{2}}{d}\) | \(154\) |
norman | \(\frac {b^{3} x +b^{3} x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+b^{3} x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+b^{3} x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {a^{2} \left (a -6 b \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {a^{2} \left (a +6 b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {6 a^{3} \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-2 b^{3} x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 b^{3} x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {4 a^{2} \left (a -3 b \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a^{2} \left (a +3 b \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {a \left (a^{2}+6 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {a \left (a^{2}+6 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) | \(286\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 101, normalized size = 1.28 \begin {gather*} \frac {4 \, {\left (d x + c\right )} b^{3} - a^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 6 \, a b^{2} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 12 \, a^{2} b \tan \left (d x + c\right )}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.45, size = 112, normalized size = 1.42 \begin {gather*} \frac {4 \, b^{3} d x \cos \left (d x + c\right )^{2} + {\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (6 \, a^{2} b \cos \left (d x + c\right ) + a^{3}\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \cos {\left (c + d x \right )}\right )^{3} \sec ^{3}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 143, normalized size = 1.81 \begin {gather*} \frac {2 \, {\left (d x + c\right )} b^{3} + {\left (a^{3} + 6 \, a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - {\left (a^{3} + 6 \, a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 6 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.67, size = 136, normalized size = 1.72 \begin {gather*} \frac {a^3\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,b^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {a^3\,\sin \left (c+d\,x\right )}{2\,d\,{\cos \left (c+d\,x\right )}^2}+\frac {6\,a\,b^2\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {3\,a^2\,b\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________